//
//  BoardView.h
//  hexa
//
//  Created by kelly on 2014. 12. 31..
//  Copyright (c) 2014년 campmobile. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "BlockView.h"

#define BOARD_WIDTH_COUNT (7)
#define BOARD_HEIGHT_COUNT (13)

@protocol FlowDelegate <NSObject>

- (void)end;

@end

@interface BoardView : UIView
{
    BlockType boardTypeMap[BOARD_WIDTH_COUNT][BOARD_HEIGHT_COUNT];
    BoardCell *boardViewMap[BOARD_WIDTH_COUNT][BOARD_HEIGHT_COUNT];
    
    NSInteger currentXIndex;
    NSInteger currentYIndex;
    BlockType firstBlockType;
    BlockType secondBlockType;
    BlockType thirdBlockType;
    
    NSMutableArray *removeIndexList;
    BOOL flowEnd;
    id <FlowDelegate> delegate;
    BOOL needToRemove;
}

- (void)setupViews:(id <FlowDelegate> )aDelegate;
- (BOOL)place:(BlockType)aFirstBlockType second:(BlockType)aSecondBlockType third:(BlockType)aThirdBlockType;
- (void)flow;
- (void)change;
- (void)left;
- (void)right;
- (void)down;
- (BOOL)findRemoveBlockList;
- (void)removeBlockList;
@end
